import request from "@/utils/request";

// 查询分类列表
export function showAllCategoryPriList(query) {
  return request({
    url: "/commodity/plat/category/list",
    method: "get",
    params: query,
  });
}
// 添加分类
export function addCategory(data) {
  return request({
    url: "/commodity/plat/category",
    method: "post",
    data,
  });
}
// 更新分类
export function updateMallProductCategoryByPri(data) {
  return request({
    url: "/commodity/plat/category",
    method: "put",
    data,
  });
}

// 删除部门
export function deletePriCate(deptId) {
  return request({
    url: "/commodity/plat/category/" + deptId,
    method: "delete",
  });
}
//是否在推荐页展示
export function isShowRecommend(data) {
  return request({
    url: "/commodity/category/isShowRecommend",
    method: "put",
    data,
  });
}

//查询编辑分类
export function getMallProductCategory(id) {
  return request({
    url: "/commodity/plat/category/" + id,
    method: "get",
  });
}
